      1  public class QueueDemo

      2  {

      3     public static void main(String[] args)

      4     {

      5        CircularArrayQueue q = new CircularArrayQueue();

      6        q.add("Tom");

      7        q.add("Diana");

      8        q.add("Harry");

      9        while (!q.empty())

     10        {

     11           System.out.println(q.remove());

     12        }

     13     }

     14  }